﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace HA.Data
{
    [Serializable]
    public class DOMap:ICloneable
    {

        public DOMap()
        {
            this._specifiedHead = new DOEntity(Color.DarkMagenta, DisplayShape.Circle);
            //this._iBound = new DOEntity(Color.);

            this._specifiedConc = new DOEntity(Color.Black, DisplayShape.Diamond);
            this._specifiedFlow = new DOEntity(Color.Black, DisplayShape.Square);
            this._generalHead = new DOEntity(Color.Green, DisplayShape.TriangleUp);
            this._massLoad = new DOEntity(Color.Yellow,DisplayShape.TriangleUp);
            this._drain = new DOEntity(Color.Blue, DisplayShape.Diamond);
            this._seepage = new DOEntity(Color.Red, DisplayShape.Circle);
            this._river = new DOEntity(Color.Blue, DisplayShape.TriangleUp);
            this._barrier = new DOEntity(Color.SaddleBrown, DisplayShape.Circle);
            this._well = new DOEntity(Color.Gold, DisplayShape.Diamond);
            this.IBound = new DOEntity(Color.Black, DisplayShape.Circle);
        }




        DOEntity _specifiedHead;

        public DOEntity SpecifiedHead
        {
            get { return _specifiedHead; }
            set { _specifiedHead = value; }
        }
        DOEntity _iBound;

        public DOEntity IBound
        {
            get { return _iBound; }
            set { _iBound = value; }
        }

        DOEntity _specifiedConc;

        public DOEntity SpecifiedConc
        {
            get { return _specifiedConc; }
            set { _specifiedConc = value; }
        }

        DOEntity _specifiedFlow;

        public DOEntity SpecifiedFlow
        {
            get { return _specifiedFlow; }
            set { _specifiedFlow = value; }
        }

        DOEntity _generalHead;

        public DOEntity GeneralHead
        {
            get { return _generalHead; }
            set { _generalHead = value; }
        }

        DOEntity _massLoad;

        public DOEntity MassLoad
        {
            get { return _massLoad; }
            set { _massLoad = value; }
        }

        DOEntity _drain;

        public DOEntity Drain
        {
            get { return _drain; }
            set { _drain = value; }
        }
        DOEntity _seepage;

        public DOEntity Seepage
        {
            get { return _seepage; }
            set { _seepage = value; }
        }


        DOEntity _river;

        public DOEntity River
        {
            get { return _river; }
            set { _river = value; }
        }

        DOEntity _barrier;

        public DOEntity Barrier
        {
            get { return _barrier; }
            set { _barrier = value; }
        }

        DOEntity _well;

        public DOEntity Well
        {
            get { return _well; }
            set { _well = value; }
        }

        public object Clone()
        {
            DOMap obj = new DOMap();
            obj.Barrier =(DOEntity) this.Barrier.Clone();
            obj.Drain = (DOEntity)this.Drain.Clone();
            obj.GeneralHead = (DOEntity)this.GeneralHead.Clone();
            obj.IBound = (DOEntity)this.IBound.Clone();
            obj.MassLoad = (DOEntity)this.MassLoad.Clone();
            obj.River = (DOEntity)this.River.Clone();
            obj.Seepage = (DOEntity)this.Seepage.Clone();
            obj.SpecifiedConc = (DOEntity)this.SpecifiedConc.Clone();
            obj.SpecifiedFlow = (DOEntity)this.SpecifiedFlow.Clone();
            obj.SpecifiedHead = (DOEntity)this.SpecifiedHead.Clone();
            obj.Well = (DOEntity)this.Well.Clone();
            return obj;
        }
        public List<string> ResetDOMap(DOMap nMap)
        {
            List<string> props = new List<string>();
            if (this.Barrier != nMap.Barrier)
            {
                this.Barrier = nMap.Barrier;
                props.Add("Barrier");
            }
            if (this.Drain != nMap.Drain)
            {
                this.Drain = nMap.Drain;
                props.Add("Drain");
            }
            if (this.GeneralHead != nMap.GeneralHead)
            {
                this.GeneralHead = nMap.GeneralHead;
                props.Add("GeneralHead");
            }
            if (this.IBound != nMap.IBound)
            {
                this.IBound = nMap.IBound;
                props.Add("IBound");
            }
            if (this.MassLoad != nMap.MassLoad)
            {
                this.MassLoad = nMap.MassLoad;
                props.Add("MassLoad");
            }
            if (this.River != nMap.River)
            {
                this.River = nMap.River;
                props.Add("River");
            }
            if (this.Seepage != nMap.Seepage)
            {
                this.Seepage = nMap.Seepage;
                props.Add("Seepage");

            }
            if (this.SpecifiedConc != nMap.SpecifiedConc)
            {
                this.SpecifiedConc = nMap.SpecifiedConc;
                props.Add("SpecifiedConc");
            }
            if (this.SpecifiedFlow != nMap.SpecifiedFlow)
            {
                this.SpecifiedFlow = nMap.SpecifiedFlow;
                props.Add("SpecifiedFlow");
            }
            if (this.SpecifiedHead != nMap.SpecifiedHead)
            {
                this.SpecifiedHead = nMap.SpecifiedHead;
                props.Add("SpecifiedHead");
            }
            if (this.Well != nMap.Well)
            {
                this.Well = nMap.Well;
                props.Add("Well");
            }
            return props;
        }
    }
}
